'use strict';

module.exports = app => {
  app.resources('v1.user', '/v1/user', 'v1.user');
  app.post('v1.auth', '/v1/login', 'v1.auth.login');
  app.get('v1.auth', '/v1/logined', 'v1.auth.logined');
  app.put('v1.auth', '/v1/logout', 'v1.auth.logout');
  app.put('v1.auth', '/v1/password_change', 'v1.auth.updatePwd');
  app.get('v1.auth', '/v1/user_exisit_query', 'v1.auth.userExists');
  // app.put('v1.auth', '/v1/profile_change', 'v1.auth.updateProfile');

  console.info('app.config.env', app.config.env);
  // import data
  if (app.config.env === 'local') {
    app.get('/v1/devraw/student/list', 'devraw.student.list');
    app.post('uer_bulk_transiaction', '/v1/devraw/student/uer_bulk_transiaction', 'devraw.student.uer_bulk_transiaction');
    app.resources('dev.user', '/v1/devraw/user', 'devraw.user');
    app.get('dev.user.list', '/v1/devraw/user/list', 'devraw.user.list');
    app.post('dev.user.init', '/v1/devraw/user/init', 'devraw.user.init');

    // app.resources('dev.edu_unit', '/v1/devraw/edu_unit', 'devraw.edu_unit');
    app.post('dev.edu_unit.academy.init', '/v1/devraw/academy/init', 'devraw.eduacademy.init');
    app.post('dev.edu_unit.department.init', '/v1/devraw/department/init', 'devraw.edudepartment.init');
    app.post('dev.edu_unit.speciality.init', '/v1/devraw/speciality/init', 'devraw.eduspeciality.init');
  }
};
